<?php
    die(json_encode(['code' => $exception->getCode(), 'msg' => $message]));
?>